package main

import (
    "fmt"
)

type direction int

const (
    NORTH = iota
    SOUTH
    WEST
    EAST
)

type Object struct {
    name string
    description string
    examine Effect
    use Effect
    use_on func(Object) Effect
}

type Room struct {
    description string
    objects map[string]Object
    exits map[direction]*Room
}

type Game struct {
    rooms []Room
    player_location *Room
    player_inventory map[string]Object
}

type Effect struct {
    text string
    update func(*Game)
}

var DoesNothing = Effect {
    text: "That doesn't do anything",
    update: nil,
}


func (self *Room) describe() {
    fmt.Println( self.description )
    for _, object := range( self.objects ) {
        fmt.Println( "There is a", object.description )
    }
}

func (self *Object) describe() {
    fmt.Println( Capitalize(self.description) )
}

func (self *Effect) invoke(game *Game) {
    
}
